﻿using OSCSchema;

namespace OSC.Base
{
    public class Text : IActivityDetail, IListItem
    {
        private readonly string m_Name;
        private readonly string m_Value;

        public Text(string name, string value)
        {
            m_Name = name;
            m_Value = value;
        }

        public templateVariableType ToTemplateVariableType()
        {
            return new templateVariableType
                       {
                           name = m_Name,
                           value = m_Value,
                           type = templateTypeRestrictionType.textVariable
                       };
        }

        public simpleTemplateVariableType ToSimpleTemplateVariableType()
        {
            return new simpleTemplateVariableType
                       {
                           name = m_Name,
                           value = m_Value,
                           type = templateSimpleTypeRestrictionType.textVariable
                       };
        }
    }
}